/**
 * 我的订单
 **/
import options from './request.js';


export const orderDetails = (storeOrderId = '') => { //入住酒店
	return options.reqJson("GET", `/order/${storeOrderId}`,{})
}

export const orderList = (data = {}) => { //获取订单列表
	return options.reqJson("GET", '/order/list', data)
};

export const orderDel = (storeOrderId = '') => { //删除订单
	return options.reqJson("DELETE",  `/order/${storeOrderId}`,{})
}

export const getOrderByIdDetails = (data = {}) => { //订单详情
	return options.reqJson("GET",  `/order/getOrderById`,data)
}

export const orderEdit = (data = {}) => { //修改订单
	return options.reqJson("PUT",  `/order/editStatue`,data)
}

export const goodsIdDetails = (goodId) => { // 获取订单详情
	return options.reqJson("GET", `/goods/${goodId}`, {})
}
export const getTicOrderPageMobile = (data = {}) => { // 中塔订单列表
	return options.reqJson("GET", `/ticOrder/getTicOrderPageMobile`, data)
}
export const getDetailListByOrderNumMobile = (data = {}) => { //获取中塔门票列表
	return options.reqJson("GET",  `/ticOrder/getDetailListByOrderNumMobile`,data)
}

export const refundOfOrder = (data = {}) => { //中塔退票申请
	return options.reqJson("POST",  `/ticOrder/refundOfOrder`,data);
}
export const cancelReservation = (data = {}) => { //取消预约接口
	return options.reqJson("PUT",  `/hotel/order/cancelReservation`,data);
};
export const getorcode = (data = {}) => { //根据电子串码获取入园凭证url
	return options.reqJson("GET",  `/ticOrder/getQrCode`,data);
};

export function dictDataProductType(data = {}) { //门票种类
	return options.reqJson('get', `/system/dict/data/list?pageNum=1&pageSize=99&dictType=product_type`,data)
}

export const pricecalendarList = (data = {}) => { //日历
	return options.reqJson("GET",  `/priceCalendar/list`,data);
};

export const orderManageId = (id = '') => { //获取酒店订单详情
	return options.reqJson("GET",  `/order/manage/${id}`);
};
export const parametersList = (ticketType) => {
	let url = `/attractions/parameters/list?pageNum=1&pageSize=99&ticketType=${ticketType}`;
	if(!ticketType) url = `/attractions/parameters/list?pageNum=1&pageSize=99`;
	return options.reqJson("GET",  url);
};

export const cancelTicOrder = (data = {}) => { //获取酒店订单详情
	return options.reqJson("POST",  `/ticOrder/cancelTicOrder`,data);
};

export const goodDeatils = (id) => { //获取酒店订单详情
	return options.reqJson("GET",  `/goods/${id}`);
};